@extends('default')
 
@section('title')
  @parent
  资产管理
@stop

@section('content')
<div class="panel panel-default">
    <div class="panel-heading">我的账户</div>
    <div class="panel-body">
        <a class="btn btn-primary" href="/addAccount">添加账户</a>
    </div>
    <table class="table table-bordered table-striped table-hover">
      <thead>
        <tr>
          <th>编号</th>
          <th>名称</th>
          <th>账户金额</th>
          <th>创建时间</th>
          <th>操作</th>
        </tr>
      </thead>
      <tbody>
        @foreach ($accounts as $account)
        <tr>
          <td>{{ $account->id }}</td>
          <td>{{ $account->title }}</td>
          <td>{{ $account->amount }}</td>
          <td>{{ $account->time }}</td>
          <td>
            <a href="/addDetail/{{ $account->id }}" class="btn btn-primary">添加流水</a>|
            <a href="/detail/{{ $account->id }}" class="btn btn-info">流水详情</a>|
            <a href="/delAccount/{{ $account->id }}" class="btn btn-danger">删除账户</a>
          </td>
        </tr>
        @endforeach
      </tbody>
    </table>

</div>
    
@stop
